#include "stdio.h"

int main()
{
	int i = 0;
	int j = 0;
	int iMax = 0;

	scanf("%d,%d", &i, &j);

	for (int k = i; k <= j; k++)
	{
		int t = k;
		int iCycle = 1;
		while ( t != 1 )
		{
			if ( (t & 0x01) != 0) //odd
			{
				t = ((t << 1) + t) + 1;
			}
			else //even
			{
				t = t >> 1;
			}

			iCycle++;

			if ( iMax < iCycle )
			{
				iMax = iCycle;
			}
		}
	}

	printf("Max Count : %d\n", iMax);

	return 0;
}